package com.yoga.utils;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class ResultVO {
    private Integer code;
    private String message;
    private Object data;
    public static ResultVO success(String message, Object data) {
        return new ResultVO(ResultCode.SUCCESS_CODE, message, data);
    }
    public static ResultVO success(String message) {
        return new ResultVO(ResultCode.SUCCESS_CODE, message,null);
    }
    public static ResultVO fail(String message) {
        return new ResultVO(ResultCode.FAIL_CODE, message, null);
    }
}
